﻿<UserControl xmlns:my="clr-namespace:System.Windows.Controls;assembly=System.Windows.Controls" 
    x:Class="TouchToolkit.Framework.UI.GestureRecordingPanel"
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
    xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
    mc:Ignorable="d"
    Height="223" Width="300">

    <Grid x:Name="LayoutRootGrid" Background="LightYellow">
        <Grid>
            <Grid.RowDefinitions>
                <RowDefinition Height="20"/>
                <RowDefinition Height="*" />
            </Grid.RowDefinitions>

            <Grid  Grid.Row="0" Margin="2" Background="LightGray">
                <TextBlock  FontWeight="Bold">Debug Panel</TextBlock>
            </Grid>
            <Grid Grid.Row="1" Margin="1">
                <!--AnonUser-->
                <Grid x:Name="LoginScreenGrid" Visibility="Collapsed">
                    <Grid >
                        <TextBox x:Name="UserNameTextBox" KeyUp="UserNameTextBox_KeyUp" Margin="87,13,0,167" HorizontalAlignment="Left" Width="155" />
                        <Button x:Name="LoginButton" Content="Login" Margin="0,12,6,168" Click="LoginButton_Click" HorizontalAlignment="Right" Width="46" />
                        <TextBlock Text="Account name:" Margin="3,15,0,160" Width="85" HorizontalAlignment="Left" />
                    </Grid>
                </Grid>
            </Grid>
        </Grid>
        <!--RegisteredUser-->
        <Grid x:Name="RegisteredUserGrid">
            <StackPanel Grid.Row="0" Orientation="Horizontal" HorizontalAlignment="Right" Margin="4" Height="20" VerticalAlignment="Top">
                <TextBlock x:Name="UserNameTextBlock" Text="Account: ?"  TextAlignment="Right"
                           MouseLeftButtonUp="ChangeAccount_MouseLeftButtonUp" Foreground="#FF1A1AE2" Width="60"/>
            </StackPanel>
            <my:TabControl>
                <my:TabItem Header="Add New">
                    <StackPanel Orientation="Vertical">
                        <TextBlock Text="Project name:" Height="25" Margin="0,5,0,0"/>
                        <TextBox x:Name="ProjectNameTextBox" Height="25"/>
                        <TextBlock Text="Gesture name:" Height="25" Margin="0,5,0,0"/>
                        <TextBox x:Name="GestureNameTextBox" Height="25" />
                        <Button x:Name="StartRecordingButton" Margin="0,5,0,0"
                                Content="Start Recording" Click="StartRecordingButton_Click" Width="105" HorizontalAlignment="Right" Height="25"/>
                    </StackPanel>
                </my:TabItem>

                <my:TabItem Header="Existing Gestures">
                    <StackPanel Orientation="Vertical">
                        <TextBlock Text="Project name:" Margin="0,5,5,0"/>
                        <ComboBox x:Name="ExistingProjectNameComboBox" ItemsSource="{Binding ProjectList}" SelectionChanged="ExistingProjectNameComboBox_SelectionChanged" Height="25" VerticalAlignment="Top"/>
                        <TextBlock Text="Gesture name:"  Margin="5,5,5,0"/>
                        <ListBox  SelectionMode="Multiple" x:Name="ExistingGestureNameListBox" ItemsSource="{Binding GestureList}"  Height="70"/>

                        <StackPanel Orientation="Horizontal" Margin="5,5,0,0" >
                            <TextBlock Margin="0,5">Speed: 1x</TextBlock>
                            <Slider Height="23" Width="105" Value="5" Margin="0,0,5,0" IsEnabled="False" />
                            <Button x:Name="RunButton" Content="Run" Click="RunButton_Click" Width="60" Height="25" HorizontalAlignment="Right"/>
                        </StackPanel>

                    </StackPanel>
                </my:TabItem>

            </my:TabControl>
        </Grid>

        <Grid x:Name="LoadingScreen" Visibility="Collapsed">
            <Rectangle Fill="LightGray" Opacity=".8" Margin="1,0,-1,0" />
            <TextBlock x:Name="MessageTextBlock" Text="Loading..." VerticalAlignment="Center" HorizontalAlignment="Center" Margin="260,20,282,6" />
        </Grid>
    </Grid>

</UserControl>
